package com.supor.aiot.common.analysis.event;

/**
 * 绑定失败自定义事件
 */
public class BindFailureEvent {

    public class Event{
        public static final String BIND_FAILURE = "Bind_Failure";
    }

    public class Param {
        /**
         * 绑定方式
         * NFC、AP
         */
        public static final String BIND_TYPE = "bind_type";
        /**
         * App登录的userId
         */
        public static final String USER_ID = "user_id";
        /**
         * 配网的WiFi SSID
         */
        public static final String WIFI_NAME = "wifi_name";
        /**
         * 配网的WiFi 密码
         */
        public static final String WIFI_PSW = "wifi_psw";
        /**
         * 配网的设备MAC地址
         */
        public static final String PRODUCT_MAC = "product_mac";
        /**
         * 失败阶段
         * 1000：碰一碰失败
         * 2000：配网失败
         */
        public static final String BIND_STAGE = "bind_step";
        /**
         * 失败原因
         * bind_step=1000，取值范围： 
         * 1001:读取产品MAC地址失败
         * 1002:nfca write failed
         * 1003:record read failed
         *  bind_step=2000，取值范围： 
         * 2001:设备不在线 
         * 2002:绑定接口调用失败 
         * 2003:找不到ap（在选择产品wifi页，用户点击“找不到产品wifi”） 
         * 2004:设备mac不合法 
         * 2005:连接ap失败 
         * 2006:用户退出配网
         */
        public static final String FAILURE_REASON = "failure_reason";
        /**
         * 异常信息
         */
        public static final String FAILURE_MSG = "failure_msg";
        /**
         * 丢包率
         */
        public static final String NETWORK_PACKETLOSS = "network_packetloss";
        /**
         * 平均延时
         */
        public static final String NETWORK_DELAY = "network_delay";
        /**
         * 网络速率
         */
        public static final String NETWORK_RATE = "network_rate";
        /**
         * 信号强度
         */
        public static final String NETWORK_RSSI = "network_rssi";
        /**
         * 旅游连接的终端数
         */
        public static final String NETWORK_DEVICES = "network_devices";
    }

    public class Value {

        public static final String BIND_TYPE_NFC = "NFC";
        public static final String BIND_TYPE_AP = "AP";

        public static final String STAGE_TOUCH = "1000";
        /**
         * 1001:读取产品MAC地址失败
         */
        public static final String REASON_MAC_NOT_FOUND = "1001";
        /**
         * 1002:nfca write failed
         */
        public static final String REASON_NFCA = "1002";
        /**
         * 1003:record read failed
         */
        public static final String REASON_RECORD = "1003";

        public static final String STAGE_BINDING = "2000";
        /**
         * 2001:设备不在线 
         */
        public static final String REASON_OFFLINE = "2001";
        /**
         * 2002:绑定接口调用失败 
         */
        public static final String REASON_UNBIND = "2002";
        /**
         * 2003:找不到ap（在选择产品wifi页，用户点击“找不到产品wifi”） 
         */
        public static final String REASON_AP_NOT_FOUND = "2003";
        /**
         * 2004:设备mac不合法 
         */
        public static final String REASON_MAC_INVALID = "2004";
        /**
         * 2005:连接ap失败 
         */
        public static final String REASON_AP_DISCONNECTED = "2005";
        /**
         * 2006:用户退出配网
         */
        public static final String REASON_ABANDON = "2006";
        /**
         * 2007:查询设备状态接口失败（403）
         */
        public static final String REASON_QUERY_FAILURE = "2007";
        /**
         * 2008:用户已注销（401）
         */
        public static final String REASON_NOT_LOGIN = "2008";

    }
}
